import { defineStore } from "pinia";
let username = sessionStorage.getItem("user");
export const useUsersStore = defineStore("user", {
  state: () => {
    return {
      name: "小猪课堂",
      age: 25,
      sex: "男",
      ismenu: false,
      goodsinfo: "",
      isheadtext: false,
      user: username,
      userInfo: {},
    };
  },
  getters: {
    increment: (state) => {
      return state.age + 100;
    },
  },
  actions: {
    setage() {
      this.age++;
    },
  },
});
